<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/jstl/spring-form.tld" prefix="form" %> 
<%@ taglib uri="/WEB-INF/jstl/spring.tld" prefix="spring"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <base href="<%=basePath%>">
    
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
   
    <title>会员登录界面</title>
    <!--标题图标-->
<link rel="shortcut icon" type="image/x-icon"
	href="<%=basePath%>assets/x-img/logo-title.ico" media="screen" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>assets/bootstrap/css/resetPro.css">
	<link href="<%=basePath%>assets/bootstrap/css/bootstrap-combined.min.css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/js/jquery-2.0.0.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/js/jquery-ui.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/js/jquery.ui.touch-punch.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/js/jquery.htmlClean.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="<%=basePath%>assets/bootstrap/ckeditor/config.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>assets/bootstrap/Font-Awesome-3.2.1/css/font-awesome.min.css">
	<!--这个js有时候会冲突-->
	<!--<script type="text/javascript" src="<%=basePath%>bootstrap/js/scripts.js"></script>-->
	  <link rel="stylesheet" href="<%=basePath%>assets/onedate/css/BeatPicker.min.css"/>
    <script src="<%=basePath%>assets/onedate/js/BeatPicker.min.js"></script>
    <script src="<%=basePath%>assets/onedate/documents/js/prism.js"></script>
	
	
	<style type="text/css">
		.onediv{
			width: 220px;
			
			margin: 0px auto;
			margin-top:22px;
			}
		strong{
			margin-right: 10px;
		}
		.borderStrong{
				border: 5px solid #dee5e5;
		}
		.xli{
			width:110px;
			
			font-size: 105%;
			font-weight: 700;
		}
		.refinput{
			width: 165px;
			margin-left: 5px;
		}
		.xspan{
			width: 15% !important;
			text-align: center;        /*文字水平居中对齐*/
   			line-height: 30px;
   			font-size: 1.1em;
   			margin-left: 0px !important;
			display: inline-block !important;
			
		}
		#valMsg{
			position: absolute;
			line-height: 20px;
			left: 59%;
			margin-top: 2px;
			display: none;
		}
		.topdiv {
	z-index: 1000; /*设置层叠优先级*/
	position: fixed;
	top: 0px;
	width: 97%;
}
		/*logo字体位置 */
.mine-set {
	color: #D81E06;
	display: inline-block;
	padding-left: 60px;
}
/*网站logo*/
.ipng {
	position: absolute;
	top: 3px;
	background: url(<%=basePath%>assets/x-img/logo-top.png) no-repeat 0px
		0px;
	display: inline-block;
	margin-left: 20px !important;
	width: 32px;
	height: 32px;
}
.zerodiv{
			margin-top: 25px;
		}
		</style>
</head>
 <body style="min-height: 660px; cursor: auto;" class="edit">
   <div class="container-fluid">
   <div class="row-fluid">
		<div class="span12">
			<div class="navbar topdiv">
				<div class="navbar-inner">
					<div class="container-fluid">
						 <a data-target=".navbar-responsive-collapse" data-toggle="collapse" class="btn btn-navbar"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a>
						  <a href="<%=basePath%>indexshow" class="brand "><span
				class="ipng z5"></span><span class="mine-set">汽车用品之家</span></a>
						<div class="nav-collapse collapse navbar-responsive-collapse">
							<ul class="nav pull-right">
								<li class="divider-vertical">
								</li>
								<li>
									<a href="#" target="_top">小组成员:</a>
								</li>
								<li>
									<a href="#" target="_top" title="李松坚(组长)、王小强、田芳、张奇、贾岩">
									李、王、田、张、贾</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row-fluid zerodiv">
		<div class="span12">
			<div class="row-fluid">
				<div class="span12">
				  <c:choose>
				  	<c:when test="${empty logininfo }">
						<div class="alert alert-info">
							 <button type="button" class="close" data-dismiss="alert">×</button>
							 <h4>提示!</h4>
							 <strong>警告!</strong> 请注意你的个人隐私安全.
						</div>
					</c:when>
					<c:otherwise>
	 					<div class="alert ${logininfo.type}">
							 <button type="button" class="close" data-dismiss="alert">×</button>
							 <h4>${logininfo.title}!</h4>
							 <strong>${logininfo.emoji}!</strong> ${logininfo.msg}.
						</div>
    				</c:otherwise>
				</c:choose>
				<%session.removeAttribute("logininfo");
				  session.removeAttribute("indexinfo");//显示一次就移除 %>
					<div class="row-fluid">
						
						<div class="span12">
						
						<div class="onediv">
						
							<div class="tabbable tabs-below" id="tabs-4826">
								<center>
							<ul class="nav nav-tabs">
								<li class="${empty regPageFlag ?'active':''} xli">
									
									<a  href="#panel-791281" data-toggle="tab"><span class="icon-user "></span>&nbsp;&nbsp;登录</a>
									
								</li>
								<li class="${empty regPageFlag ?'':'active'}  xli">
									<a href="#panel-845681" data-toggle="tab"><span class="icon-credit-card"></span>&nbsp;&nbsp;注册</a>
								</li>
							</ul>
							</center>
							<div class="tab-content">
								<div class="tab-pane ${empty regPageFlag ?'':'active'} " id="panel-845681">
									<p>
											<form class="form-signin" action="<%=basePath%>reg" method="post">
											<span id="valMsg" class="label badge-info">账号验证中...</span>	
									        <span class="xspan">账号 </span><input type="text" name="id" class="form-control refinput" placeholder="输入账号" required autofocus onblur="vali(this);"/>
									        <span class="xspan">姓名 </span><input type="text" name="name"  class="form-control refinput" placeholder="输入姓名" required autofocus/>
									        <span class="xspan">密码 </span><input type="password" name="pw"  class="form-control refinput" placeholder="请输入密码" required/>
									        <span class="xspan">重输 </span><input type="password" name="repw"  class="form-control refinput" placeholder="请重新输入密码" required/>
									        <span class="xspan">性别 </span><select name="sex" class="refinput">
									        									<option value="3" selected="selected">未指定</option>
																				<option value="1">男生</option>
																				<option value="2">女生</option>
																			</select>
									        <span class="xspan">生日 </span>
									        		<input type="text" name="birthday" class="refinput" data-beatpicker="true" data-beatpicker-position="['*','*']"  data-beatpicker-module="today,clear"
        																						 value="1994-05-11" />
									        
									        
									        <span class="xspan">手机</span><input type="text" name="tel"  class="form-control refinput" placeholder="输入联系方式" required autofocus/>
									        <span class="xspan">地址 </span><input type="text" name="address"  class="form-control refinput" placeholder="输入收货地址" required autofocus/>
									        <span class="">个性说明 </span>
									        <textarea  name="desc" placeholder="输入简介" required   autofocus></textarea>
									        
									        <button id="oneBut" class="btn btn-large btn-success  btn-block" type="submit">注册</button>
									      <form:errors path="id"/>
				<form:errors path="name"/>
				<form:errors path="pw"/>
									      </form>
									</p>
								</div>
								<div class="tab-pane ${empty regPageFlag ?'active':''} " id="panel-791281">
									<p>
										<form class="form-signin" action="<%=basePath%>login" method="post">
									        <label for="inputEmail" class="sr-only">账号</label>
									        <input type="text" name="id" id="inputEmail" class="form-control" placeholder="输入账号" required autofocus>
									        <label for="inputPassword" class="sr-only">密码</label>
									        <input type="password" name="pw" id="inputPassword" class="form-control" placeholder="请输入密码" required>
									        <div class="checkbox">
									          <label>
									            <input type="checkbox" value="remember-me" name="saveCookie"> 记住密码
									          </label>
									        </div>
									        <button class="btn btn-large btn-success  btn-block" type="submit">登录</button>
									      </form>
									</p>
								</div>
							</div>
						</div>
   						</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
  </body>
  
   <script type="text/javascript">
	  //标签声明触发函数
	  	function vali(one){
	  		var val=$(one).val();
	  	    //alert(name);
	  	      $.post("<%=basePath%>valiReg",{id:val},function(data){
	  	      $("#valMsg").html(data.msg).removeClass().addClass(data.type).css('display','block');;
	  	    	if(data.type=="label badge-success"){
	  	    		 $("#oneBut").removeAttr("disabled");
	  	    	}else{
	  	    		$("#oneBut").attr("disabled","disabled");
	  	    	}
	  	    	},"json");
	  	}
   </script>
</html>
